The present invention relates to a data transfer apparatus connected to a bus through which data passes so as to send and receive data to and from the bus.
A data transfer apparatus having a so-called point-to-point connection bus structure is known (for example, see Design Wave Magazine, December 2003, page 49, FIG. 3). In this data transfer apparatus, a plurality of masters and a plurality of slaves are connected to a bus through which data passes, and if more than one master contend for a right to use the bus (hereinafter referred to as a “bus use right”), an arbiter arbitrates between the masters so that the master having the highest priority obtains the bus right. The master that has the bus use right transfers data to a specific slave. Upon completing the data transfer, the master releases the bus right, and the master having the second highest priority then obtains the bus use right.
FIG. 5 is an enlarged diagram illustrating a controller 100 for use in a known data transfer apparatus having a point-to-point connection bus structure. The controller 100 shown in FIG. 5 includes multiplexers (Mux) 111 and 112, an arbiter 113, an address decoder 114, and data buses 115 and 116. The controller 100 also includes master ports 101_1a, 101_2a, 101_3a, and 101_4a corresponding to four masters (not shown) and slave ports 102_1a, 102_2a, 102_3a, and 102_4a corresponding to four slaves (not shown).
It is now assumed that, among the four masters, the master corresponding to the master port 101_1a has a bus use right. When writing data from this master into the slave corresponding to the slave port 102_3a, the multiplexer 111 selects write data WData from the master port 101_1a according to a signal from the arbiter 113 to instruct the multiplexer 111 to select the master corresponding to the master port 101_1a. The selected data WData is then transferred to the bus 115 and is further transferred to the slave corresponding to the slave port 102_3a. In this manner, data is written from a certain master into a certain slave.
Conversely, if the master corresponding to the master port 101_1a reads data from the slave corresponding to the slave port 102_3a, the multiplexer 112 selects read data RData from the slave port 102_3a according to a signal from the address decoder 114 to instruct the multiplexer 112 to select the slave corresponding to the slave port 102_3a. The selected read data RData is then transferred to the bus 116 and is further transferred to the master corresponding to the master port 101_1a In this manner, data is read out from a specific slave to a specific master.
Another type of data transfer apparatus, a data transfer apparatus having a ring-connection bus structure in which a plurality of masters and a plurality of slaves are connected to one bus in a ring-like form, is also known (for example, see Japanese Unexamined Patent Application Publication No. 11-167560). In this type of data transfer apparatus, data can be simultaneously transferred between a plurality of masters and a plurality of slaves. Additionally, instead of obtaining or releasing a bus use right described above, a master can start data transfer with a slave at any time when the bus is available.
In the above-described data transfer apparatus having a point-to-point connection bus structure, because there is only one master that can transfer data on the bus, the data transfer efficiency is very low when the bus contention occurs frequently. Also, in addition to the time required for data transfer, more time (time lag) for delivering a bus use right from one master to another master is needed, thereby wasting the time.
In the data transfer apparatus having a ring-connection bus structure, data continuously flows into the bus during the data transfer. Accordingly, if the master, which only serves the function of relaying data, attempts to transfer data generated by the master itself, bus contention occurs between such data and the relaying data, and the master cannot start transferring the data generated by the master. Thus, when transferring the data generated by the master itself, it is necessary to interrupt the transfer operation of the relaying data. Additionally, as the number of masters and slaves increases, the ring becomes larger, thereby increasing the overall time required for data transfer.